home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!dfdesign.demon.co.uk
- From: Dominic Feeley <dom@dfdesign.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: STDIO.H
- Followup-To: comp.os.msdos.programmer
- Date: Wed, 10 Apr 96 11:09:19 GMT
- Organization: DF Designs
- Message-ID: <829134559snz@dfdesign.demon.co.uk>
- References: <4ke6d8$r42@newsbf02.news.aol.com> <316ADBEA.3FE8@willows.com>
- Reply-To: dom@dfdesign.demon.co.uk
- X-NNTP-Posting-Host: dfdesign.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.30
- X-Mail2News-Path: dfdesign.demon.co.uk
-
- In article <316ADBEA.3FE8@willows.com>
- tarang@willows.com "Tarang Deshpande" writes:
- > JeffSCman wrote: [ and I snipped ]
- > >
- > > In STDIO.H the constant FOPEM_MAX is defined using the constant
- > > _NFILE_ which == 20. This limits the number of files that I can
- > > open at one time to 20 files. Can I increase this value safely ??
- >
- > No. MS-DOS has a limit of 20 open file handles at a time. Even if you did
- > enlarge the number when you attempted to open the 20th file you would get
- > back an error. Note that you can not actually open 20 files since there are
- > some files open automatically.
-
- Followups set to comp.os.msdos.programmer, where this belongs.
- It is probably also in their FAQ, as it certainly is one.
-
- It is definately covered in the comp.lang.c FAQ, in section:
-
- 19.18: I'm getting an error, "Too many open files". How can
- I increase the allowable number of simultaneously open files?
-
- It doesn't give an answer, but then I would not expect it to.
-
- The default number of MS-DOS filehandles is 20, but it is easy to change.
- However you cannot change it in C
-
- Move the new file handle maximum into register bx, move 0x67 into ah
- and execute int 0x21
- Your compiler will likely have functions and unions to allow this.
-
- Obviously your FILES= stuff in CONFIG.SYS needs to be set appropriately.
-
- As an aside, could people please leave in an email address for posts
- they quote. This should have gone to straigt to Jeff, but I cannot
- contact him from the info given.
-
- --
- Dominic Feeley
-